import axios from 'axios'

const REFUND_BASE_REST_API_URL = "http://localhost:8090/api/v1/refunds";

class RefundsService{

    getAllRefunds(){
        return axios.get(REFUND_BASE_REST_API_URL)
    }

    createRefund(refund){
        return axios.post(REFUND_BASE_REST_API_URL,refund)
    }

    getRefundById(refundId){
        return axios.get(REFUND_BASE_REST_API_URL + "/" + refundId)
    }

    updateRefund(refundId,refund){
        return axios.put(REFUND_BASE_REST_API_URL + "/" + refundId,refund)

    }
    // getRefundByEmployeeId(employeesId){
    //     return axios.get(REFUND_BASE_REST_API_URL + "/getByEmployee/" + employeesId)
    // }

    deleteRefund(refundId){
        return axios.delete(REFUND_BASE_REST_API_URL + "/" + refundId);
    }

}

export default new RefundsService();